<% if Time.now.hour < 12 %>
  window.alert("The hour is <%= Time.now.hour %>") ;
<% else %>
  window.alert("It is now the afternoon") ;
<% end %>

